<template>
  <div>
    <!-- 注意：top和nav部分是固定的，滚动页面是不会移动，覆盖在底部可变内容的上方 -->
    <div class="top">
      <span class="logo">优音乐</span>
      <span class="download">下载APP</span>
    </div>
    <div class="nav">
      <router-link class="link" to="/recommend">推荐</router-link>
      <router-link class="link" to="/hot">热歌榜</router-link>
      <router-link class="link" to="/search">搜索</router-link>
    </div>
    <div class="router-view">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {

}
</script>

<style scoped>
  .top {
    width: 100%;
    height: 80px;
    background-color: #ff4b00;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 6;
  }
  .nav {
    width: 100%;
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 6;
    background-color: #fff;
  }
  .nav .link {
    height: 46px;
    font-size: 20px;
    /* padding: 10px; */
    color: black;
    display: inline-block;
    width: 32%;
    text-align: center;
    line-height: 46px;
  }
  /* 当页面的url和router-link的to属性值相同时，会自动加上router-link-active这个class */
  .nav .link.router-link-active {
    color: #ff4b00;
    text-decoration: underline;
  }
  .router-view {
    margin-top: 126px;
  }
  .logo {
    color: #fff;
    font-size: 24px;
    line-height: 80px;
    margin-left: 20px;
  }
  .download {
    width: 100px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 18px;
    border-radius: 17px;
    background-color: #fff;
    color: #ff4b00;
    float: right;
    margin-right: 10px;
    margin-top: 22px;
  }
</style>